<?php $post = $this->get('posts');?>
		
<div class="x-list-title">
<table width="100%" border="0" height="100%">
<tr>
	<td align="left">
		<h2>
			Tài sản mới
		</h2>
	</td>
	<td align="right">	
		<div class="x-list-options">

		</div>
	</td>
</tr>
</table>	
</div>
<form method="post" action="<?php _e(actionUrl($this))?>" onsubmit="return ajax_form(this)">
<input type="hidden" name="ID" value="<?php _e($this->get('ID'))?>"/>

<div class="form-message"></div>
<input type="hidden" name="ID" value="<?php _e($post['ID'])?>"/>
<table style="background-color: #F0F0F0;border: 1px solid #CBCBCD;" width="100%" cellpadding="4" class="x-form">
	<tr>
		<td class="x-form-label" >Mã tài sản : </td>
		<td class="x-form-input">
			<input class="x-text" readonly type="text" style="color:red;width:243px;" name="code" value="<?php _e($this->get("code"))?>"/>
			<span class="x-form-label" style="margin-left:35px;">Tên tài sản : </span>
			<input style="width:240px;"  class="x-text" type="text" name="title"  value="<?php _e($post["name"]);?>"/>
		</td>
	</tr>
	
	<tr>
		<td class="x-form-label">Loại tài sản : </td>
		<td class="x-form-input">
			<select name="asset_type_id" style="width:250px;" class="x-select">
				<?php foreach($this->get('type') as $ktype=>$vtype){
					?>
					<option value="<?php _e($vtype['ID']);?>"><?php _e($vtype['title']);?></option>
					<?php
				}?>
			</select>
			<span class="x-form-label" style="margin-left:35px;"> Nguyên giá :&nbsp;</span>
			<input class="x-text" type="text" name="value" style="width:177px;"   value="<?php _e($post["value"]);?>"/>
			<select class="x-select" name="mtype" >
				<option value="VND">VND</option>
				<option value="USD">USD</option>
			</select>
		</td>
	</tr>
	<tr>
		<td class="x-form-label">Model : </td>
		<td class="x-form-input">
			<input class="x-text" style="width:243px;"  type="text" name="model"  value="<?php _e($post["model"]);?>"/>
			<span class="x-form-label" style="margin-left:15px;"> Hãng sản xuất :&nbsp;</span>
			<input style="width:239px;"  class="x-text" type="text" name="origin"  value="<?php _e($post["origin"]);?>"/>
		</td>
	</tr>
													
	<tr>
		<td class="x-form-label">Ngày mua : </td>
		<td class="x-form-input">
			<input class="x-text x-date"  onclick="date_picker(this,{noTime:true})" type="text" name="datebuy" style="width:60px"  value="<?php _e($post["datebuy"]);?>"/>
			<span><i style="font-size:11px;">(dd/mm/yy)</i></span>
			<span class="x-form-label" style="margin-left:116px;"> Địa điểm mua :&nbsp;</span>
			<input class="x-text" style="width:240px;" type="text" name="buyat" value="<?php _e($post["buyat"]);?>"/>
		</td>
	</tr>
	
	<tr>
		<td class="x-form-label">Thời gian bảo hành : </td>
		<td class="x-form-input">
			<input class="x-text x-date"  type="text" name="time" onclick="date_picker(this,{noTime:true})" style="width:170px;"/>
			<span><i style="font-size:11px;">(dd/mm/yy)</i></span>
			<span style="margin-left:106px;" class="x-form-label">Mã số bảo hành :&nbsp;</span>
			<input class="x-text"  type="text" name="codesu"  style="width:239px;"/>
		</td>
	</tr>
	<tr>
		
		<td class="x-form-label"> Tình trạng tài sản :&nbsp;&nbsp; </td>
		<td class="x-form-input">
			<select name="status" class="x-select" style="width:247px;">
				<option value="using">Đang sử dụng</option>
				<option value="dont">Không sử dụng</option>
			</select>
		</td>
	</tr>
	
	<tr>
		<td class="x-form-label">Mô tả : </td>
		<td class="x-form-input">
			<textarea class="x-editor" name="desc" style="width:610px;height:150px;"></textarea>
		</td>
	</tr>
	<tr>
		<td class="x-form-label">
			<span class="x-attachment"></span>
		</td>
		<td class="x-form-input">
			<div  class="x-files" url="<?php _baseUrl();?>/asset/Index/Upload?asset_id=<?php _e($this->get('asset_id'))?>" post_id="<?php _e($post['ID'])?>"></div>
		</td>
	</tr>
	<tr>
		<td></td>
		<td class="x-form-input">
			<input type="submit" value="Xác Nhận" class="x-button x-save"/>
			<a href="#Asset/" class="x-button x-fresh">Hủy bỏ</a>
		</td>
	</tr>
</table>
</form>
